<?php
namespace app\api\controller\vppz;


use think\Cache;


use \app\admin\model\vppz\Keshi as KeshiModel;
use \app\admin\model\vppz\KeshiHospital as KeshiHospitalModel;

use \addons\vppz\library\Vpower;

class Keshi extends App
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function _initialize(){
        parent::_initialize();
        $this->KeshiModel = new KeshiModel;
        $this->KeshiHospitalModel = new KeshiHospitalModel;
    }

    /**
     * 服务下单页
     */
    public function keshilists(){
		$area=$this->_area;
		$mine = $this->_mine;
        $keshi = $this->KeshiModel->where('is_local','=',1)->order('weigh','DESC')->select();
        if(empty($bjjy) === FALSE){
            foreach ($bjjy as $bk=>$bj){
                $bjjy[$bk]['createtime'] = date('Y-m-d H:i:s',$bjjy[$bk]['createtime']);
            }
        }
		$this->success('',array(
			'now'=>time(),
			'keshi'=>$keshi
		));
    }

    /**
     * 科室详情页
     */
    public function detail(){

		$id = input('id');

		$keshi = $this->KeshiHospitalModel->find($id);
		if(empty($keshi)){
			$this->error('不存在或暂停提供');
		}
		$this->success('',array(
			'now'=>time(),
			'keshi'=>$keshi
		));
    }

}
